<% #endcoding:utf-8%>
<div class="search-header">
    <div class="container container-search">
      <div class="row">
        <div class="col-md-12">
          <ul class="nav nav-pills">
            <li role="presentation" <%if params[:type].nil?%>class="active"<%end%>><a href="/searchs?kw=<%=params[:kw]%>">所有</a></li>
            <li role="presentation" <%if params[:type]=='demand'%>class="active"<%end%>><a href="/searchs?type=demand&kw=<%=params[:kw]%>">需求</a></li>
            <li role="presentation" <%if params[:type]=='question'%>class="active"<%end%>><a href="/searchs?type=question&kw=<%=params[:kw]%>">问答</a></li>
            <li role="presentation" <%if params[:type]=='user'%>class="active"<%end%>><a href="/searchs?type=user&kw=<%=params[:kw]%>">用户</a></li>
          </ul>
        </div>
      </div>
      <%=form_for :search,url:'/searchs',:html=>{:method=>"GET",:class=>'row'} do |f|%>
          <div class="col-md-9">
            <input type="text" class="form-control" placeholder="输入关键字" name="kw" value="<%=params[:kw]%>">
          </div>
          <div class="col-md-3">
            <button type="Submit" class="btn btn-primary btn-lg btn-block">搜 索</button>
          </div>
      <% end %>
    </div>
</div>
<p></p><p></p>
<div class="container">

  <%if @searchs%>
      <div class="row">
        <div class="col-md-9">
          <div class="panel">
            <div class="panel-heading">
              <h3 class="demand-top">搜索结果(<%=@total%>)</h3>
            </div>
            <ul class="list-group">
              <%=render @searchs%>
            </ul>
            <%=will_paginate @searchs %>
            <div class="panel-footer"></div>
          </div>
        </div>
        <div class="col-md-3">

        </div>
      </div>
  <%end%>
</div>
